﻿using System;
using System.Collections.Generic;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Threading.Tasks;
using System.Windows;
using KqAutoDesign.Models;

namespace KqAutoDesign
{
    /// <summary>
    /// App.xaml 的交互逻辑
    /// </summary>
    public partial class App : Application
    {
        public static GlobalConfigs GlobalConfigs { get; set; }=new GlobalConfigs();
        public static void LoadGlobalConfig()
        {
            GlobalConfigs.ConfigFilePath = Environment.CurrentDirectory + "\\config.xml";
            GlobalConfigs.ResourceFolderPath = Environment.CurrentDirectory + "\\Resources\\";
            GlobalConfigs.IconFolderPath = Environment.CurrentDirectory + "\\Resources\\Icons\\";
            GlobalConfigs.WorkflowFolderPath = Environment.CurrentDirectory + "\\Resources\\Workflows\\";
            GlobalConfigXMLManager manager = new GlobalConfigXMLManager();
            manager.GetConfigApps();
            manager.GetConfigWorkflows();
            ResourcesLoader.Load();
        }
    }
}
